﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace FinanceAPI.Model
{
    /// <summary>
    /// 余额表
    /// </summary>
    [Serializable]
    [Description("余额表")]
    [Table("Pd_Balance")]
    public class PdEntityBalance : AggregateRoot
    {
        /// <summary>
        /// 集团ID
        /// </summary>
        [MaxLength(10)]
        public string GroupId { get; set; }

        /// <summary>
        /// 集团名称
        /// </summary>
        [MaxLength(100)]
        public string GroupName { get; set; }

        /// <summary>
        /// 公司代码
        /// </summary>
        [MaxLength(50)]
        public string CompanyCode { get; set; }
        /// <summary>
        /// 公司名称
        /// </summary>
        [MaxLength(50)]
        public string CompanyName { get; set; }

        /// <summary>
        /// 开始会计期间
        /// </summary>
        public int StartPostingPriod { get; set; }

        /// <summary>
        /// 结束会计期间
        /// </summary>
        public int EndPostingPriod { get; set; }

        /// <summary>
        /// 科目代码
        /// </summary>
        [MaxLength(50)]
        public string SubjectCode { get; set; }
        /// <summary>
        /// 科目名称
        /// </summary>
        [MaxLength(50)]
        public string SubjectName { get; set; }
        /// <summary>
        /// 币种
        /// </summary>
        [MaxLength(50)]
        public string Currency { get; set; }
        /// <summary>
        /// 汇率
        /// </summary>
        [MaxLength(50)]
        public string ExchangeRate { get; set; }

        /// <summary>
        /// 期初余额
        /// </summary>
        public decimal InitialBalance { get; set; }
        /// <summary>
        /// 期末余额
        /// </summary>
        public decimal EndingBalance { get; set; }
        /// <summary>
        /// 本期贷方发生额
        /// </summary>
        public decimal CurrentCreditBalance { get; set; }
        /// <summary>
        /// 本年贷方发生额
        /// </summary>
        public decimal CurrentCreditYearBalance { get; set; }

        /// <summary>
        /// 本期借方发生额
        /// </summary>
        public decimal CurrentDebitBalance { get; set; }

        /// <summary>
        /// 本年借方发生额
        /// </summary>
        public decimal CurrentDebitYearBalance { get; set; }
    }


    public class RootBalance
    {
        public decimal 期初余额 { get; set; }

        public decimal 本期贷方发生额 { get; set; }

        public string 公司名称 { get; set; }

        public int 开始会计期间 { get; set; }

        public string 币别 { get; set; }

        public int 结束会计期间 { get; set; }

        public decimal 期末余额 { get; set; }

        public string 科目名称 { get; set; }

        public string 公司编码 { get; set; }

        public decimal 本年贷方发生额 { get; set; }

        public string 科目代码 { get; set; }

        public decimal 本期借方发生额 { get; set; }

        public decimal 本年借方发生额 { get; set; }
    }

}
 